#ifndef FGWRAPPER_H
#define FGWRAPPER

#include <string>
#include <vector>
#include <fgcomm.h>
#include <fcscomm.h>
#include <sdlwrap.h>


class SerialPort;

class FgWrapper
{
public:
	explicit FgWrapper(std::string &cfg_name);
	~FgWrapper();
	void init(void);
	bool process(void);
	void process2(void);

private:
	FgWrapper(void);
	void WriteToFG(void);
	bool isWindowPresent(void);

	std::string cfg_name_;

	SerialPort *fg_;
	SerialPort *fcs_;

	FgComm fgcomm_;
	FcsComm fcscomm_;

	sdl::SDL_Thread *thread_;
	bool finish_;

	std::string watch_window_;
	uint32_t timeout_;
	uint32_t last_time_;
};


#endif

